#if !defined(ximera_system_library)
#define ximera_system_library

// -----------------------------------------------------------

#include <ximera/types.hpp>

namespace ximera { namespace system
{
    class XIMERA_API Library
    {
    public:
        Library(String const& fileName);
        ~Library();

        String const& fileName() const;
        LibraryHandle handle() const;
        LibraryFunctionAddr loadFunction(char const* name);

        template <typename FunctionType>
        FunctionType* loadFunction(char const* name) {
            return reinterpret_cast<FunctionType*>(loadFunction(name));
        }

    private:
        String _fileName;
        LibraryHandle _handle;
    };
}}

// -----------------------------------------------------------

#endif